package com.cavas.domain.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.cavas.domain.bean.Finance;
import com.cavas.domain.bean.Membre;
import com.cavas.domain.bean.Pret;
import com.cavas.domain.dao.DaoPret;

@Service
@Transactional
public class ServicePretImpl implements ServicePret{

	
	@Autowired
	DaoPret daoPret;
	
	public void setDaoPret(DaoPret dp){
		this.daoPret = dp;
	}
	
	@Override
	public void addPret(Pret pret, Membre membre) {
		daoPret.addPret(pret,membre);
	}

	@Override
	public List<Pret> allPret() {
		return daoPret.allPret();
	}

	@Override
	public List<Pret> allPret(String mail) {
		return daoPret.allPret(mail);
	}
	

	@Override
	public void deletePret(int id) {
		daoPret.deletePret(id);
	}

	@Override
	public int getTotalPret() {
		// TODO Auto-generated method stub
		return daoPret.getTotalPret();
	}


	@Override
	public Pret getOpenPret(String mail) {
		// TODO Auto-generated method stub
		return daoPret.getOpenPret(mail);
	}

	@Override
	public Pret getExtraPret(String mail) {
		return daoPret.getExtraPret(mail);
	}


}
